/*
 * Static.h
 *
 *  Created on: 2013. 11. 15.
 *      Author: jjaehuny
 */

#ifndef PROJECTZ_STATIC_H_
#define PROJECTZ_STATIC_H_

#include "NUtil/Single.h"
#include "NUtil/ThreadPool.h"
#include "NProcess/Static.h"
#include "NGameLog/Static.h"

namespace ProjectZ {

class Static : public NUtil::Single<Static>
{
public:
	typedef 	std::map<int, bool> 	STARTTREE;

public:
	Static() : _clsThreadPool(4), _maxConnectUserCountInServer(0)
	{
		for (int i = 0; i<10; i++)
		{
			_cacheServer[i] = false;
			_locationServer[i] = false;
			_friendServer[i] = false;
			_guildServer[i] = false;
		}
	}

	~Static() {}

	void			SetMaxConnectUserCountInServer(int count) { _maxConnectUserCountInServer = count; }
	int				GetMaxConnectUserCountInServer() { return _maxConnectUserCountInServer; }

public:
	NUtil::ThreadPool &	GetThreadPool() { return _clsThreadPool; }

public:
	NProcess::Static 		_clsProcessStatic;
	NUtil::ThreadPool		_clsThreadPool;
	NGameLog::Static		_clsGameLogStatic;

private:
	int _maxConnectUserCountInServer;

public:
	STARTTREE 			_cacheServer;
	STARTTREE 			_locationServer;
	STARTTREE 			_friendServer;
	STARTTREE			_guildServer;
};

} /*ProjectZ*/

#endif /* PROJECTZ_STATIC_H_ */
